/*
 * Author: Thomas
 * Initializes the datatables support.
 */

cmt = {};

/**
 * 
 * @type type
 */
cmt.datatables = {};

// sets the datatable language
$(document).ready(function () {
    // set datatables language matching session language
    var dtLang = navigator.language;
    var langLink;
    if (dtLang.indexOf("de") === 0) {
        langLink = "/res/datatables/internationalisation/de.json";
    } else {
        langLink = "/res/datatables/internationalisation/en.json";
    }
    $.extend($.fn.dataTable.defaults, {
        "language": {
            "url": langLink
        }
    });
});